<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=0">

		<title>个人中心</title>

		<link href="../AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet" type="text/css">
		<link href="../AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css">
		<link href="../css/personal.css" rel="stylesheet" type="text/css">
		<link href="../css/vipstyle.css" rel="stylesheet" type="text/css">
		<script src="../AmazeUI-2.4.2/assets/js/jquery.min.js"></script>
		<script src="../AmazeUI-2.4.2/assets/js/amazeui.js"></script>
		<script type="text/javascript" src="../js/common.js"></script>
	</head>

	<body>
		<!--头 -->
		<header>
			<article>
				<div class="mt-logo">
					<!--顶部导航条 -->
					<div class="am-container header">
						<ul class="message-l">
							<div class="topMessage">
								<div class="menu-hd" id="indexHeader">
								</div>
							</div>
						</ul>
						<ul class="message-r">
							<div class="topMessage home">
								<div class="menu-hd">
									<a href="index.html" target="_top" class="h">商城首页</a>
								</div>
							</div>
						</ul>
					</div>
					<div class="nav white">
					</div>

					<div class="clear"></div>
				</div>
				</div>
			</article>
		</header>
		<div class="nav-table">
			<div class="long-title"><span class="all-goods">个人中心</span></div>
			<div class="nav-cont">
				<ul>
				</ul>
				
			</div>
		</div>
		<b class="line"></b>
		<div class="center">
			<div class="col-main">
				<div class="main-wrap">
					<div class="wrap-left">
						<div class="wrap-list">
							<div class="m-user">
								<!--个人信息 -->

								

								<!--个人资产-->
								<div class="m-userproperty" style="height:175px;width: 500px;">
									<div class="s-bar">
										<i class="s-icon"></i>个人资产
									</div>
									<p class="m-wallet">
										<a href="#">
											<em class="m-num" id="money">0.00</em>
											<span class="m-title">账户余额</span>
										</a>
									</p>
								</div>

							</div>
						</div>
					</div>
					<div class="clear"></div>
				</div>

			</div>

			<!--侧边栏-->
			<aside class="menu">
				<ul>
					<li class="person active">
						<a href="pindex.html"><i class="am-icon-user"></i>个人中心</a>
					</li>
					<li class="person">
						<p>个人资料</p>
						<ul>
							<li>
								<a href="pinformation.html">个人信息</a>
							</li>
						</ul>
					</li>
					<li class="person">
						<p>我的交易</p>
						<ul>
							<li>
								<a href="order.html">订单管理</a>
							</li>
						</ul>
					</li>
				</ul>
			</aside>
			
		</div>
		
		<script>
			$(function(){
				/*检验用户是否登录*/
				if (getCookie("username") == null || getCookie("userid") == null) {
                    window.location.href="login.html";
                    return;
			    }else{
			    	$("#indexHeader").append(`
                            <a href="#" target="_top" class="h">您好，${getCookie("username")}</a>
                            <a href="javascript:void(0);" onclick="clearCookie()">退出</a>`
                    );
			    }
			    
			   /*根据userid请求数据*/
			   var userid=getCookie("userid");
			   //个人信息
			   $.ajax({
			   		type:"get",
					url:"/user/info/"+userid,
					success:function(result){
						var money=result.data.money;
						$("#money").text(money);
						$("#userNick").text(result.data.username);
					}
			   });
			})	
		</script>
	</body>

</html>